<ion-header>
    <ion-navbar color="primary">
        <!-- <button ion-button icon-only menuToggle>
            <ion-icon name="menu"></ion-icon>
        </button> -->

        <ion-title text-center><span class="custom-font-size-t">Lista de líneas</span></ion-title>
        <ion-title text-center [ngSwitch]="mode">
            <span class="custom-font-size-t" *ngSwitchCase="'production'">Modo Producción</span>
            <span class="custom-font-size-t" *ngSwitchCase="'alimentator'">Modo Alimentador</span>
            <span class="custom-font-size-t" *ngSwitchDefault>Modo {{mode}}</span>
        </ion-title>
        
        <ion-buttons end>
            <button ion-button (click)='logOut()'>
                <ion-icon name="log-out"></ion-icon>
            </button>
        </ion-buttons>
    </ion-navbar>
</ion-header>
<ion-content padding>
    <ion-searchbar class="custom-font-size" (ionInput)="getItems($event)"></ion-searchbar>
    <ion-list>
        <!-- <ion-item [hidden]='items.length>0' color ="danger"> No hay líneas</ion-item> -->
        <button class="custom-font-size" ion-item *ngFor="let workcenter of items" (click)="workcenterSelected(workcenter)">
            <div class="review-font-color" *ngIf="(mode === 'alimentator' && workcenter.review_consumptions === true); else default">
                <ion-icon name="send"></ion-icon> {{ workcenter.name }}
            </div>
            <ng-template #default>
                <ion-icon name="send"></ion-icon> {{ workcenter.name }}
            </ng-template>
        </button>  
    </ion-list>

</ion-content>
